<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jiejie</title>
    <link rel="stylesheet" type="text/css" media="all" href="/static/layui/css/layui.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/static/css/common.css"/>
    <link rel="stylesheet" type="text/css" media="all" href="/static/js/jquery.min.js"/>
</head>

<body>
<style>#c_button { width:72px; height:35px;border: 2gd;background: #3ca4ee;}</style>
    <div class="layui-fluid">
            <div class="layui-row">
                    <div class="layui-col-sm12">
                        <!--标题-->
                        <div style="width: 80px; font-weight: bolder; font-size: large; margin-top: 20px; margin-left: auto; margin-right: auto">Case列表</div><br/>
                         <br><br>
                      </div>

                        <div class="layui-col-xs3">
                            <form action="/Case/GetCaseByID" method="GET">
                                搜索ID:
                                <div class="layui-inline">
                                    <input class="layui-input" type="text" value=" " name="SearchID" id="idReload" />
                                </div>
                                <button class="layui-btn layui-btn-normal" style="width: 70px" type="submit">搜索</button>
                            </form>
                        </div>
                        <div class="layui-col-xs3">
                    <form action="/Case/GetCaseByPerson" method="GET">
                                上传人:
                        <div class="layui-inline">
                            <input class="layui-input" type="text"value=" " name="SearchPerson" id="PersonReload" />
                        </div>
                        <button class="layui-btn layui-btn-normal" style="width: 70px" type="submit">搜索</button>
                    </form>
                </div>
                <div class="layui-col-xs3">
                    <form action="/Case/GetCaseByProject" method="GET">
                        项目选择:
                        <div class="layui-inline">
                            <input class="layui-input" type="text"value=" " name="SearchProject" id="ProjectReload" />
                        </div>
                             <button class="layui-btn layui-btn-normal" style="width: 70px" type="submit">搜索</button>
                    </form>
                </div>
                <div class="layui-col-xs3 ">
                    <div class="layui-col-xs6 layui-col-md-offset8">
                    <form action="/Case/Add" method="GET">
                        <button class="layui-btn layui-btn" style="width: 60px" type="submit">新建</button>
                    </form>
                    </div>
                </div>
            <br><br>
        <table class="layui-table " lay-skin="line">
            <div>
                <thead>
                <tr>
                    <th lay-data="{field:'id', width:80, sort: true}">ID</th>
                    <th lay-data="{field:'FileName', width:80}">文件名</th>
                    <th lay-data="{field:'FileContext', width:80, sort: true}">说明</th>
                    <th lay-data="{field:'PersonName'}">上传人</th>
                    <th lay-data="{field:'ProjectName'}">项目名称</th>
                    <th lay-data="{field:'Status', sort: true}">是否启用</th>
                    <th lay-data="{field:'CreateTime', sort: true}">创建时间</th>
                    <th lay-data="{field:'id', width:10,}">运行</th>
                    <th lay-data="{field:'id', width:10,}">编辑</th>
                </tr>
                {% for i in contacts  %}
                    <tr>
                        <p>
                        <td>{{ i.id }}</td>
                        <td>{{ i.FileName }}</td>
                        <td>{{ i.FileContext }}</td>
                        <td>{{ i.PersonName }}</td>
                        <td>{{ i.ProjectName }}</td>
                        <td>{{ i.Status }}</td>
                        <td>{{ i.CreateTime }}</td>
                        <td>
                            <button id="Api" value={{ i.id }} class="layui-btn" type="submit" onclick="run()">运行</button></td>
                        <form action="/Case/detail" method="GET" >
                            <td><button name="BtE" value={{ i.id }}  class="layui-btn" type="submit">编辑</button></td>
                        </form>
                        </p>
                    </tr>
                {% endfor %}
                </thead>
            </div>
        </table>
        <div class="pagination">
            <span class="step-links">
                {% if contacts.has_previous %}
                    <a href="?page={{ contacts.previous_page_number }}">上一页</a>
                {% endif %}
                <span class="current">
                    第 {{ contacts.number }} 页，共 {{ contacts.paginator.num_pages }}页.
                </span>
                {% if contacts.has_next %}
                    <a href="/index/?page={{ contacts.next_page_number }}">下一页</a>
                {% endif %}
            </span>
        </div>
    </div>
    </div>
    </div>
    </div>
    <div class="fly-footer" style="margin-right: auto; margin-left: auto; width: 200px;">
        <p><a href="#" target="_blank">我打 - 测试部</a> 2018</p>
    </div>
    <script type="text/javascript" src="/static/layui/layui.all.js"></script>
    <script type="text/javascript" src="/static/js/jquery.min.js"></script>
    <script>
          function run() {
                var ID = $('#Api').val();
                $.ajax({
                    type:'GET',
                    url :'/Case/APIjenkins',
                    data : {'SearchID':ID},
                    success:function (callback) {
                        function loadPageWithBlank() {
                        }
                    }
                });
            }
  function loadPage(url) {

  }
// 载入页面(打开新网页)
function loadPageWithBlank(url) {
    window.open(url);
}
    </script>

</body>



</html>